package com.retail.shopping.remote.factory;

import com.retail.common.core.domain.Result;
import com.retail.shopping.remote.ShoppingCartFeign;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * 功能描述:
 *
 * @version: java version 1.8
 * @author: liguangyao
 * @date: 2024-03-03 下午 4:45
 */
@Component
public class ShoppingCartFallbackFactory implements FallbackFactory<ShoppingCartFeign> {
    @Override
    public ShoppingCartFeign create(Throwable cause) {
        return new ShoppingCartFeign () {
            @Override
            public Result deleteCartMiddenBySkuUser(Integer userId, String str) {
                return Result.error ("调用失败");
            }
        };
    }
}
